<template>
  <div class="wedding-container">
    <wedding-list :list="list"></wedding-list>
    <common-footer />
  </div>
</template>

<script>
import { computed, onMounted } from "@vue/runtime-core";
import { useStore } from "vuex";
import CommonFooter from "/src/components/common-footer/index.vue";
import WeddingList from "./components/wedding-list.vue";

export default {
  components: {
    CommonFooter,
    WeddingList,
  },
  setup() {
    const store = useStore();
    const list = computed(() => store.state.wedding.list);
    onMounted(() => {
      store.dispatch("fetchWedding");
    });
    return {
      list,
    };
  },
};
</script>

<style lang="less" scoped>
.wedding-container {
  margin: 20px 70px 0;
  background: #141515;
}
</style>